<style type="text/css">
        .orgNodeNameWidth{width:240px;}
    </style>
<div  ng-controller="organizationalCtrl">
 <input type="file" id="orgExcelFile" style=" display:none;" nv-file-select="" uploader="uploader" accept=".xls,.xlse">
	<div class="mainview" >
		<div class="organizationaldy">
			<div class="organizationall" style=" height:655px;">
				<selectormodal ng-if="ApiData.ApiOpen"   apidata="ApiData" ></selectormodal>
			</div>
			<div class="organizationalr" style=" z-index:998; overflow: inherit">
				<div class="Nodecontrol">
					<div class="Nodecontroltitle" >						
                        <div ng-if="PublicObj.organization_ID!=''" class="Nodecontroltitlel">节点编辑</div>
						<div ng-if="PublicObj.organization_ID==''" class="Nodecontroltitlel">节点新增</div>
						<div class="organizationalzwf"></div>
						<div class="Nodecontroltitler">
						    <div class="xzzjd" btncon="btnAdd" btn-obj="btnlist" ><i class="iconfont">&#xe7f7;</i><span>新增子节点</span></div>
                            <div  btncon="btnDel" class="delect" btn-obj="btnlist"><i class="iconfont">&#xe636;</i>删除</div>
                        </div>
					</div>
					<div class="Nodecontrolmain">
						<div class="Nodecontrolmaincolumn">
							<ul class="Nodecontroljdsz">
								<li><div class="Nodecontroljdszl"><label><i class="iconfont">&#xe713;</i>节点名称</label></div><div class="Nodecontroljdszr" tooltips tooltip-class="orgNodeNameWidth" tooltip-template="请在左侧选择父节点，再新增子节点。" style="width: 500px;"><input ng-focus="checkParent()" set-focus type="text" ng-model="PublicObj.organization_Name"  placeholder="必填"  name="" ng-disabled="PublicObj.parentId==0 && PublicObj.userrole!=1 "></div></li>
								<li><div class="Nodecontroljdszl"><label><i class="iconfont">&#xe630;</i>父节点</label></div><div class="Nodecontroljdszr"><input type="" placeholder="请选择所属父节点" ng-model="PublicObj.parentName"  name="" disabled="disabled"><span ng-click="UpdateParentFun($event)" class="Nodecontroljdszxg" ng-show="PublicObj.parentId!=0">修改级别</span></div>
<selectormodal  ng-if="ParentData.ApiOpen" apidata="ParentData" ></selectormodal>
								</li>

								<li><div class="Nodecontroljdszl"><label  title="查看详细"><i class="iconfont">&#xe91b;</i>人员数量</label></div><div class="Nodecontroljdszr"><input ng-show="!PeopleData.ApiOpen" type=""  title="查看详细" ng-model="PublicObj.organization_Num"  name="" disabled="disabled" >
<input ng-show="PeopleData.ApiOpen" type="" title="" ng-model="PeopleData.UserList.length"  name="" disabled="disabled" >
								<span class="Nodecontroljdszxg" ng-click="AddUserListFun($event)">批量添加人员</span></div>
<selectormodal  ng-if="PeopleData.ApiOpen" apidata="PeopleData" ></selectormodal>
								</li>
								<li><div class="Nodecontroljdszl"><label><i class="iconfont">&#xe713;</i>显示顺序</label></div><div class="Nodecontroljdszr"><input type="text" placeholder="必填"  required  ng-model="PublicObj.wSort" ng-disabled="PublicObj.parentId==0 && PublicObj.userrole!=1" />
								</div></li>
							</ul>
						</div>
						<div class="Nodecontrolmaincolumn">
							<ul class="Nodecontrolmaincolumnejsdjs">
								<li><div class="Nodecontrolsxl"><label for=""><i class="iconfont">&#xe713;</i>部门编号</label></div><div class="Nodecontrolsxr"><input placeholder="选填" type="" value="" ng-model="PublicObj.organization_No"><span  ng-click="Neworganization_No()" class="Nodecontrollable">自动生成</span></div></li>
                                <li><div class="Nodecontrolsxl"><label for=""><i class="iconfont">&#xe6d7;</i>地址</label></div>
                                        <label> 省份：
                                              <select class="xiaoge" ng-model="province" ng-options="s.name for s in list" ng-change="c(province.name)">
                                                <option value="">--请选择--</option>
                                              </select>
                                      </label> 
                                      <label ng-show="province.child.length">城市： 
                                         <select ng-model="city" class="xiaoge" ng-options="sh.name for sh in province.child" ng-change="c2(city.name)">
                                              <option value="">--请选择--</option>
                                        </select>
                                      </label> 
                                      <label ng-show="city.child.length"> 县级/区域
                                          <select class="xiaoge"  ng-model="area" ng-options="x.value for x in city.child" ng-change="c3(area.value)">
                                                  <option value="">--请选择--</option>
                                          </select>
                                      </label>
                                </li>
                                <li><div class="Nodecontrolsxl"><label for=""><i class="iconfont">&#xe625;</i>级别</label></div><div class="Nodecontrolsxr"><input placeholder="选填" type="" ng-model="PublicObj.level"></div></li>

								<li><div class="Nodecontrolsxl"><label for=""><i class="iconfont">&#xe623;</i>外线电话</label></div><div class="Nodecontrolsxr"><input placeholder="选填" type="" ng-model="PublicObj.organization_InnerPhone"></div></li>
								<li><div class="Nodecontrolsxl"><label for=""><i class="iconfont">&#xe60c;</i>内线电话</label></div><div class="Nodecontrolsxr"><input  placeholder="选填" type="" ng-model="PublicObj.organization_OuterPhone"></div></li>
								<li><div class="Nodecontrolsxl"><label for=""><i class="iconfont">&#xe672;</i>手机号码</label></div><div class="Nodecontrolsxr"><input placeholder="选填" type="" ng-model="PublicObj.organization_Phone"></div></li>
							</ul>
						</div>
                        <!--PublicObj.parentId==0&&(PublicObj.userrole==1||PublicObj.userrole==2)-->
                        <div class="Nodecontrolmaincolumn" ng-if="false" >
							<ul class="Nodecontrolmaincolumnejsdjs">
								<li><div class="Nodecontrolsxl"><label for=""><i class="iconfont">&#xe634;</i>orgId</label></div><div class="Nodecontrolsxr"><input placeholder="选填" type="" value="" ng-model="PublicObj.organization_ID" ng-disabled="PublicObj.parentId==0"></div></li>
								<li><div class="Nodecontrolsxl"><label for=""><i class="iconfont">&#xe659;</i>密钥</label></div><div class="Nodecontrolsxr  " ng-class={Nodecontrolmaincolumn_text_zhankai:Nodecontrolmaincolumn}>
                                <textarea ng-model="PublicObj.UID" cols="50" rows="5" class="Nodecontrolmaincolumn_text"></textarea>
                                <span  ng-click="getkey()" class="Nodecontrollable" style="right:35px;top:0" >生成密钥</span><span  ng-click="getpubkey()" class="Nodecontrollable Nodecontrolmaincolumn_zhankai" ><svg class="icon ng-scope"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#icon-shouqi2"></use></svg>  <div class="tooltip top" role="tooltip" style="top: -29px; width: 65px; left: -32px;" ng-show="kbinfo.filerename">
	                                        <div class="tooltip-arrow" style="left: 42px">
	                                        </div>	                                        
	                                        <div class="tooltip-inner" style="text-align: left">
	                                          查看密钥
	                                        </div>
                                            </div></span></div></li>
                                	<li><span style="color:Red">*</span>注：新注册用户需要先点击“生成密钥”，才能使用系统对外开放的接口</li>
							</ul>
                            
						</div>

						<div class="Nodecontrolmaincolumn">
							<div class="Person_in_charge_Nodecontrolfzr">
	<div class="Person_in_charge_Nodecontrolfzrtitle"><i class="iconfont"></i>负责人</div>
		<div class="Person_in_charge_Nodecontrolfzrmain">
			<ul>
	 			<li ng-repeat="item in personList"><div labelshow-directive="{{item.user_ID}}" title="{{item.user_Name}}" class="img-circle Person_in_charge_Nodecontrolfzr_img">
                <span ng-click="DelPersonListFun(item.user_ID)" class="personnelIMnamemain_del">X</span>
                <img ng-src="{{item.user_Img}}" src="/images/avatar.png" onerror="javascript:this.src='/images/avatar.png'" /></div></li>
				<li tooltips tooltip-template="注意：负责人只负责当前组织机构，不包含子组织机构"><div ng-click="AddpersonFun($event)" class="checkboxsxtjtj">+</div></li>
	 		</ul>
	</div>
</div>

						</div>
					</div>

				</div>
                 <!--ng-click="SaveFun()"-->
                <selectormodal  ng-if="personData.ApiOpen" apidata="personData" ></selectormodal>
				<div class="Nodecontrolfooter">                    
                    <button class="btn" btncon="btnAdd btnUpd" btn-obj="btnlist" ng-if="!isloading">保存</button>                
                    <div class="btn new_curriculum_bottom_quxiao" ng-if="isloading">
                        <btnloading isbtnload="isloading" style="float:left;padding-right: 6px;margin-top: 2px;"></btnloading>保存中
                    </div>
                </div>                
            <loading isloading="isloading"></loading>
			</div>
		</div>
	</div>
</div>
